A parallel computer including multiple processors operable in parallel enhances processing efficiency by dividing a task as a unit of processing into multiple threads and then making the multiple processors to execute the threads. A processor device, such as a central processing unit (CPU) including multiple cores, is one of parallel computers.
For a parallel computer of this type, there has been proposed a technique in which a storage area is first allocated to a thread continuously activating from the start to the end of a program, and then variables used in the other treads threads are stored in the storage area (for example, see Japanese Laid-open Patent Publication No. 2002-99426). This technique ensures that even when another thread executed in parallel ends, a variable used in the other thread is held in the storage area without being lost during the execution of the program.
Another proposed technique is that, based on a value set to a flag allocated to a main memory, a thread waits for execution of synchronous processing until execution of an instruction code by another thread completes, and executes the synchronous processing after the execution of the instruction code is completed (for example, see Japanese Laid-open Patent Publication No. 2011-134145).